16-12-2019

Some highlights of my project


  • Arrhythmia detection
  • Smartphone cameras can measure heart rhythm
  • But the signal is very noisy
  • Improve SNR by filtering
  • R-package PPGtools

The raw data 1/2

The raw data 2/2

Filtering noisy data (Eilers 2003)

Find \(z\) that minimizes penalized likelihood function \(Q\).

Two goals are balanced: 1) fit to the data \(y\) and 2) roughness of \(z\)



\[ Q = |\mathbf{y - z}|^2 + \lambda|\mathbf{Dz}|^2 \\ \]

\[ \frac{\partial Q}{\partial \mathbf{z'}} = -2(\mathbf{y-z}) + 2\lambda\mathbf{D'Dz} \\ \]

\[ \mathbf{y} = (\mathbf{I} + \lambda\mathbf{D'D})\mathbf{z} \\ \]

\[ \mathbf{z} = (\mathbf{I} + \lambda\mathbf{D'D})^{-1} \mathbf{y} \]

The equation part is done!

Problem: timesteps are of unequal length

workflow PPGtools

library(PPGtools)

# prepare data
raw_signal <- prepInput(rec, channel = "Green", tstart = 20, tstop = 40)

# smooth series z
lambda <- matrix(10^(seq(-1, 5, 2)), dimnames = list(paste0('lambda_', 1:4), NULL))
z <- smoothWE(raw_signal = raw_signal, lambda = lambda, d=2, uni = TRUE)

# plot results
title <- "Uniform sampling assumed, d=2, lambda = 10^-1, 10^1, 10^3, 10^5"
plotLambda(raw_signal = raw_signal, z = z, title = title)

Filtering raw data

Other steps

  • cross-validation
  • interpolation
  • peak detection
  • feature extraction

References